# -*- coding: utf-8 -*-
'''
Created on 2011-3-12

@author: Holmes2
'''
import cPickle as p
import os

def get_total(account):
    
    dir0="D:\Program Files\Apache2.2\htdocs\py\Orderbook_2.0\data"
    dir=dir0+'\\'+account  
    os.chdir(dir)
    
    infofile='Per_info.data'
    f = file(infofile)
    Per_info = p.load(f)
    
    total=Per_info[4]
    
    f.close()
    
    os.chdir(dir0)
    
    return total

print get_total('677266')
